
'use strict';
const app = require('tcb-admin-node');
const tcb_config = { env: 'meatom04-01-2gue0fnr49a26808' };
app.init(tcb_config).auth();
const db = app.database();
let event_param
function updateVer(params) {
  event_param = params
  return db.collection("Version").where({
    id: params.id,
    platform: event_param.platform
  }).update({
    des: params.des
  }).then(res => {
    return res
  }).catch(error => {
    return console.error();
  })
}
exports.main = async (event, context, callback) => {
  return await updateVer(event)
};
